﻿#ifndef PAGE9_H
#define PAGE9_H

#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include <QLineEdit>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QComboBox>
#include <QSqlTableModel>
#include "databaseManager.h"

class Page9 : public QWidget
{
    Q_OBJECT

public:
    explicit Page9(QWidget* parent = nullptr);

signals:
    void orderRequested();
    void productionRequested();
    void financeRequested();
    void storeRequested();
    void pageRequested7();
    void pageRequested8();
    void pageRequested9();
    void addEmployeeRequested();
    void pageRequested10();
    void pageRequested13();
        void pageRequested1();

public slots:
    void financeHide();
    void signuphide();
  void onFrontButtonClicked();

protected:
    void showEvent(QShowEvent* event) override;

private slots:
    void onConfirmButtonClicked();  // 新增槽函数
    void openAddInventoryDialog();

private:
    void setupCentralWidgets();  // 设置信息编辑框的函数

    QPushButton* orderButton;
    QPushButton* productionButton;
    QPushButton* financeButton;
    QPushButton* warehouseButton;
    QPushButton* inventoryButton;
    QPushButton* purchaseButton;
    QPushButton* queryButton;
    QPushButton* helpButton;
    QPushButton* confirmButton;  // 新增确定按钮
    QComboBox* categoryCombo;  // 种类下拉框
    QLineEdit* quantityEdit;  // 数量编辑框
    QPushButton* addEmployeeButton;
    DatabaseManager* dbManager;  // 数据库管理器实例
    QPushButton*connectButton;//连接按钮
        QPushButton*frontButton;
};

#endif // PAGE9_H
